home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 90 / CDMM_90_1.ISO / Industry Giant 2 / ig2_setup_demo.exe / 00_01_TUTORIAL 2_1900.TXT < prev    next >
Encoding:
Text File  |  2002-05-23  |  19.2 KB  |  738 lines

  1. // ============================================================================
  2. // TUTORIAL 2
  3. // 
  4. // The script implements tutorial nr 2.
  5. //
  6. // Topic :
  7. //     - Building complex production
  8. //  - Playing with production parameters
  9. // ============================================================================
  10.  
  11. // ============================================================================
  12. // VARIABLES
  13. // ============================================================================
  14.     
  15. [VARIABLES]
  16.     
  17.     // Parameter variables.
  18.     ReturnState$
  19.     FirstTutorialTextID
  20.     LastTutorialTextID
  21.     TutorialTextID
  22.  
  23.     // Helper variables.
  24.     Local_i
  25.  
  26.     // Building IDs
  27.     ShopID
  28.     BuildingFactoryID
  29.     MineID
  30.     StoragePlace1ID
  31.     SteelMillID
  32.     LoggingCampID
  33.     SawMillID
  34.     StoragePlace2ID
  35.  
  36.     // Production IDs
  37.     MineProductionSet
  38.     SteelMillProductionSet
  39.     LoggingCampProductionSet
  40.     SawMillProductionSet
  41.  
  42. // ============================================================================
  43. // INIT
  44. // ============================================================================
  45. [STATE Load]
  46.  
  47.     LoadGame("missions\\00_01_Tutorial 2_1900.ig2")
  48.     LoadMissionConfig("missions\\00_01_Tutorial 2_1900.mis")
  49.     SetOutputMode(2)
  50.     SetMsgFilter(65535)
  51.     StartCommandFiltering()
  52.     ControlBar.SetDisable(871)
  53.     DialogControl.SetDisable(20)
  54.     ShopID = 733
  55.     BuildingFactoryID = 734
  56.     MineProductionSet = 0
  57.     SteelMillProductionSet = 0
  58.     LoggingCampProductionSet = 0
  59.     SawMillProductionSet = 0
  60.     SetState("Intro")
  61.  
  62.  
  63. // ============================================================================
  64. // INTRO
  65. // ============================================================================
  66. [STATE Intro]
  67.  
  68.     FirstTutorialTextID = 350
  69.     LastTutorialTextID  = 352
  70.     ReturnState = 'SelectMine'
  71.     SetState("Show_tutorial_text_serie")
  72.  
  73. // ============================================================================
  74. // BUILD MINE
  75. // ============================================================================
  76. [STATE SelectMine]       
  77.     TutorialTextID = 302
  78.     ReturnState = 'WaitForSelectMine'
  79.     SetState("Show_tutorial_text")
  80.  
  81.  
  82. [STATE WaitForSelectMine]
  83.     IF BuildDialog.IsOpen() == 1 AND
  84.         BuildDialog.GetPanelID() == 1 AND
  85.         BuildDialog.GetSelectionID() == 0
  86.     THEN 
  87.         SetState("BuildMine")
  88.     END
  89.  
  90. [STATE BuildMine]
  91.     
  92.     TutorialTextID = 303
  93.     ReturnState = 'WaitForBuildMine'
  94.     SetState("Show_tutorial_text")
  95.  
  96. [STATE WaitForBuildMine]
  97.     IF IsEnterState
  98.     THEN
  99.         ClearCommandQueue()
  100.     END
  101.  
  102.     // Is there a queued command ? 
  103.     IF GetCommandQueueLength() > 0
  104.     THEN
  105.         IF NextCommand.GetType() == 4 AND
  106.             NextCommand.GetInternType() == 0
  107.  
  108.         THEN    
  109.             NextCommand.Run()
  110.             MineID = User.GetLastBuildingBuilt()
  111.             ClearCommandQueue()
  112.             SetState("BuildStoragePlace1")
  113.         ELSE
  114.             NextCommand.Cancel()
  115.             ClearCommandQueue()
  116.             SetState("BuildMine")
  117.         END
  118.     ELSE
  119.         IF BuildDialog.IsOpen() <> 1 OR
  120.             BuildDialog.GetPanelID() <> 1 OR
  121.             BuildDialog.GetSelectionID() <> 0
  122.         THEN 
  123.             SetState("SelectMine")
  124.         END
  125.     END
  126.  
  127.  
  128. // ============================================================================
  129. // BUILD STORAGE PLACE 1
  130. // ============================================================================
  131. [STATE BuildStoragePlace1]
  132.     
  133.     TutorialTextID = 306
  134.     ReturnState = 'WaitForStoragePlace1'
  135.     SetState("Show_tutorial_text")
  136.  
  137. [STATE WaitForStoragePlace1]
  138.     IF IsEnterState
  139.     THEN
  140.         ClearCommandQueue()
  141.     END
  142.  
  143.     // Is there a queued command ? 
  144.     IF GetCommandQueueLength() > 0
  145.     THEN
  146.         IF NextCommand.GetType() == 7
  147.         THEN    
  148.             SetState("VerifyForStoragePlace1Location")
  149.         ELSE
  150.             NextCommand.Cancel()
  151.             ClearCommandQueue()
  152.             SetState("BuildStoragePlace1")
  153.         END
  154.     END
  155.  
  156. [STATE VerifyForStoragePlace1Location]
  157.     IF IsHighlighted(BuildingFactoryID) AND
  158.         IsHighlighted(MineID)
  159.     THEN
  160.         NextCommand.Run()
  161.         StoragePlace1ID = User.GetLastBuildingBuilt()
  162.         ClearCommandQueue()
  163.         SetState("BuildSteelMill")
  164.     ELSE
  165.         TutorialTextID = 400
  166.         ReturnState = 'WaitForStoragePlace1'
  167.         SetState("Show_tutorial_text")
  168.     END
  169.  
  170.  
  171. // ============================================================================
  172. // SET MINE PRODUCTION
  173. // ============================================================================
  174. [STATE SetMineProduction]
  175.     
  176.     TutorialTextID = 309
  177.     ReturnState = 'WaitForMineProduction'
  178.     SetState("Show_tutorial_text")
  179.  
  180. [STATE WaitForMineProduction]
  181.     // Is there a queued command ? 
  182.     IF GetCommandQueueLength() > 0
  183.     THEN
  184.         IF NextCommand.GetType() == 14
  185.         THEN    
  186.             SetState("Verify_mine_production")
  187.         ELSE
  188.             NextCommand.Cancel()
  189.             ClearCommandQueue()
  190.             SetState("SetMineProduction")
  191.         END
  192.     END
  193.  
  194. [STATE Verify_mine_production]
  195.     // Is it correct product & load ?
  196.     IF NextCommand.GetInternType() == 0 AND
  197.         NextCommand.GetInternType2() == 0.25
  198.     THEN
  199.         MineProductionSet = 1
  200.         NextCommand.Run()
  201.         ClearCommandQueue()
  202.         SetState("SetSteelMillProduction")
  203.               
  204.     ELSE
  205.         NextCommand.Cancel()
  206.         ClearCommandQueue()
  207.         SetState("SetMineProduction")
  208.     END
  209.  
  210.  
  211. // ============================================================================
  212. // BUILD STEEL MILL
  213. // ============================================================================
  214. [STATE BuildSteelMill]
  215.     
  216.     TutorialTextID = 307
  217.     ReturnState = 'WaitForSteelMill'
  218.     SetState("Show_tutorial_text")
  219.  
  220. [STATE WaitForSteelMill]
  221.     IF IsEnterState
  222.     THEN
  223.         ClearCommandQueue()
  224.     END
  225.  
  226.     // Is there a queued command ? 
  227.     IF GetCommandQueueLength() > 0
  228.     THEN
  229.         IF NextCommand.GetType() == 4 AND
  230.             NextCommand.GetInternType() == 10
  231.         THEN    
  232.             SetState("VerifySteelMillLocation")
  233.         ELSE
  234.             NextCommand.Cancel()
  235.             ClearCommandQueue()
  236.             SetState("BuildSteelMill")
  237.         END
  238.     END
  239.  
  240. [STATE VerifySteelMillLocation]
  241.     IF IsHighlighted(StoragePlace1ID)
  242.     THEN
  243.         NextCommand.Run()
  244.         SteelMillID = User.GetLastBuildingBuilt()
  245.         ClearCommandQueue()
  246.         SetState("SetMineProduction")
  247.     ELSE
  248.         TutorialTextID = 401
  249.         ReturnState = 'WaitForSteelMill'
  250.         SetState("Show_tutorial_text")
  251.     END
  252.  
  253.  
  254. // ============================================================================
  255. // SET STEEL MILL PRODUCTION
  256. // ============================================================================
  257. [STATE SetSteelMillProduction]
  258.     
  259.     TutorialTextID = 312
  260.     ReturnState = 'WaitForSteelMillProduction'
  261.     SetState("Show_tutorial_text")
  262.  
  263. [STATE WaitForSteelMillProduction]
  264.     // Is there a queued command ? 
  265.     IF GetCommandQueueLength() > 0
  266.     THEN
  267.         IF NextCommand.GetType() == 14
  268.         THEN    
  269.             SetState("Verify_steel_mill_production")
  270.         ELSE
  271.             NextCommand.Cancel()
  272.             ClearCommandQueue()
  273.             SetState("SetSteelMillProduction")
  274.         END
  275.     END
  276.  
  277. [STATE Verify_steel_mill_production]
  278.     // Is it correct product & load ?
  279.     IF NextCommand.GetInternType() == 23 AND
  280.         NextCommand.GetInternType2() == 0.50
  281.     THEN
  282.         SteelMillProductionSet = 1
  283.         NextCommand.Run()
  284.         ClearCommandQueue()
  285.         SetState("BuildLoggingCamp")
  286.     ELSE
  287.         NextCommand.Cancel()
  288.         ClearCommandQueue()
  289.         SetState("SetSteelMillProduction")
  290.     END
  291.  
  292.  
  293. // ============================================================================
  294. // BUILD LOGGING CAMP
  295. // ============================================================================
  296. [STATE BuildLoggingCamp]
  297.     
  298.     TutorialTextID = 318
  299.     ReturnState = 'WaitForLoggingCamp'
  300.     SetState("Show_tutorial_text")
  301.  
  302. [STATE WaitForLoggingCamp]
  303.     IF IsEnterState
  304.     THEN
  305.         ClearCommandQueue()
  306.     END
  307.  
  308.     // Is there a queued command ? 
  309.     IF GetCommandQueueLength() > 0
  310.     THEN
  311.         IF NextCommand.GetType() == 4 AND
  312.             NextCommand.GetInternType() == 2
  313.         THEN    
  314.             SetState("VerifyLoggingCampLocation")
  315.         ELSE
  316.             NextCommand.Cancel()
  317.             ClearCommandQueue()
  318.             SetState("BuildLoggingCamp")
  319.         END
  320.     END
  321.  
  322. [STATE VerifyLoggingCampLocation]
  323.     IF IsHighlighted(StoragePlace1ID)
  324.     THEN
  325.         NextCommand.Run()
  326.         LoggingCampID = User.GetLastBuildingBuilt()
  327.         ClearCommandQueue()
  328.         SetState("BuildSawMill")
  329.     ELSE
  330.         TutorialTextID = 401
  331.         ReturnState = 'WaitForLoggingCamp'
  332.         SetState("Show_tutorial_text")
  333.     END
  334.  
  335.  
  336. // ============================================================================
  337. // SET LOGGING CAMP PRODUCTION
  338. // ============================================================================
  339. [STATE SetLoggingCampProduction]
  340.     
  341.     TutorialTextID = 327
  342.     ReturnState = 'WaitForLoggingCampProduction'
  343.     SetState("Show_tutorial_text")
  344.  
  345. [STATE WaitForLoggingCampProduction]
  346.     // Is there a queued command ? 
  347.     IF GetCommandQueueLength() > 0
  348.     THEN
  349.         IF NextCommand.GetType() == 14
  350.         THEN    
  351.             SetState("Verify_logging_camp_production")
  352.         ELSE
  353.             NextCommand.Cancel()
  354.             ClearCommandQueue()
  355.             SetState("SetLoggingCampProduction")
  356.         END
  357.     END
  358.  
  359. [STATE Verify_logging_camp_production]
  360.     // Is it correct product & load ?
  361.     IF NextCommand.GetInternType() == 7 AND
  362.         NextCommand.GetInternType2() == 0.25
  363.     THEN
  364.         LoggingCampProductionSet = 1
  365.         NextCommand.Run()
  366.         ClearCommandQueue()
  367.         SetState("SetSawMillProduction")
  368.     ELSE
  369.         NextCommand.Cancel()
  370.         ClearCommandQueue()
  371.         SetState("SetLoggingCampProduction")
  372.     END
  373.  
  374.  
  375. // ============================================================================
  376. // BUILD SAW MILL
  377. // ============================================================================
  378. [STATE BuildSawMill]
  379.     
  380.     TutorialTextID = 324
  381.     ReturnState = 'WaitForSawMill'
  382.     SetState("Show_tutorial_text")
  383.  
  384. [STATE WaitForSawMill]
  385.     IF IsEnterState
  386.     THEN
  387.         ClearCommandQueue()
  388.     END
  389.  
  390.     // Is there a queued command ? 
  391.     IF GetCommandQueueLength() > 0
  392.     THEN
  393.         IF NextCommand.GetType() == 4 AND
  394.             NextCommand.GetInternType() == 9
  395.         THEN    
  396.             SetState("VerifySawMillLocation")
  397.         ELSE
  398.             NextCommand.Cancel()
  399.             ClearCommandQueue()
  400.             SetState("BuildSawMill")
  401.         END
  402.     END
  403.  
  404. [STATE VerifySawMillLocation]
  405.     IF IsHighlighted(StoragePlace1ID)
  406.     THEN
  407.         NextCommand.Run()
  408.         SawMillID = User.GetLastBuildingBuilt()
  409.         ClearCommandQueue()
  410.         SetState("SetLoggingCampProduction")
  411.     ELSE
  412.         TutorialTextID = 401
  413.         ReturnState = 'WaitForSawMill'
  414.         SetState("Show_tutorial_text")
  415.     END
  416.  
  417.  
  418. // ============================================================================
  419. // SET SAW MILL PRODUCTION
  420. // ============================================================================
  421. [STATE SetSawMillProduction]
  422.     
  423.     TutorialTextID = 328
  424.     ReturnState = 'WaitForSawMillProduction'
  425.     SetState("Show_tutorial_text")
  426.  
  427. [STATE WaitForSawMillProduction]
  428.     // Is there a queued command ? 
  429.     IF GetCommandQueueLength() > 0
  430.     THEN
  431.         IF NextCommand.GetType() == 14
  432.         THEN    
  433.             SetState("Verify_saw_mill_production")
  434.         ELSE
  435.             NextCommand.Cancel()
  436.             ClearCommandQueue()
  437.             SetState("SetSawMillProduction")
  438.         END
  439.     END
  440.  
  441. [STATE Verify_saw_mill_production]
  442.     // Is it correct product & load ?
  443.     IF NextCommand.GetInternType() == 21 AND
  444.         NextCommand.GetInternType2() == 0.50
  445.     THEN
  446.         NextCommand.Run()
  447.         ClearCommandQueue()
  448.         SetState("StoragePlaceSettings")
  449.     ELSE
  450.         NextCommand.Cancel()
  451.         ClearCommandQueue()
  452.         SetState("SetSawMillProduction")
  453.     END
  454.  
  455. // ============================================================================
  456. // STORAGE PLACE SETTINGS
  457. // ============================================================================
  458. [STATE StoragePlaceSettings]
  459.     
  460.     TutorialTextID = 330
  461.     ReturnState = 'WaitForStoragePlaceDlg'
  462.     SetState("Show_tutorial_text")
  463.  
  464. [STATE WaitForStoragePlaceDlg]
  465.  
  466.     IF StorageDialog.IsOpen() == 1
  467.     THEN
  468.         FirstTutorialTextID = 331
  469.         LastTutorialTextID  = 333
  470.         ReturnState = 'WaitForBuildingMaterialIndustry'
  471.         SetState("Show_tutorial_text_serie")
  472.     END
  473.  
  474. [STATE WaitForBuildingMaterialIndustry]
  475.  
  476.     IF StorageDialog.GetCategory() == 19 AND
  477.         StorageDialog.GetLevel(73) == 0
  478.     THEN
  479.         TutorialTextID = 335
  480.         ReturnState = 'WaitForDialogAccept'
  481.         SetState("Show_tutorial_text")
  482.     ELSE
  483.         IF StorageDialog.IsOpen() == 0
  484.         THEN
  485.             SetState("StoragePlaceSettings")
  486.         END
  487.     END
  488.  
  489. [STATE WaitForLevel]
  490.     IF StorageDialog.GetLevel(73) == 0
  491.     THEN
  492.         TutorialTextID = 339
  493.         ReturnState = 'WaitForDialogAccept'
  494.         SetState("Show_tutorial_text")
  495.     ELSE
  496.         IF StorageDialog.IsOpen() == 0
  497.         THEN 
  498.             SetState("StoragePlaceSettings")
  499.         ELSE
  500.             IF StorageDialog.GetCategory() <> 19
  501.             THEN
  502.                 SetState("WaitForStoragePlaceDlg")
  503.             END
  504.         END
  505.     END
  506.  
  507.  
  508. [STATE WaitForDialogAccept]
  509.     IF IsEnterState
  510.     THEN
  511.         ClearCommandQueue()
  512.     END
  513.  
  514.     // Is there a queued command ? 
  515.     IF GetCommandQueueLength() > 0
  516.     THEN
  517.         IF NextCommand.GetType() == 31
  518.         THEN    
  519.             SetState("VerifyStoragePlaceSettings")
  520.         ELSE
  521.             NextCommand.Cancel()
  522.             ClearCommandQueue()
  523.             SetState("WaitForStoragePlaceDlg")
  524.         END
  525.     ELSE
  526.         IF StorageDialog.IsOpen() == 0
  527.         THEN
  528.             SetState("StoragePlaceSettings")
  529.         END
  530.     END
  531.  
  532. [STATE VerifyStoragePlaceSettings]
  533.     // Check the settings.
  534.     IF ChangeStoragePlace.GetProductLevel(0) == 0.25 AND
  535.         ChangeStoragePlace.GetProductLevel(7) == 0.25 AND
  536.         ChangeStoragePlace.GetProductLevel(21) == 0.25 AND
  537.         ChangeStoragePlace.GetProductLevel(23) == 0.25 AND
  538.         ChangeStoragePlace.GetProductLevel(73) == 0.0
  539.     THEN
  540.         NextCommand.Run()
  541.         SetState("SetBuildingFactoryProduction")
  542.     ELSE
  543.         SetState("StoragePlaceSettings")
  544.     END
  545.  
  546.  
  547. // ============================================================================
  548. // BUILD STORAGE PLACE 2
  549. // ============================================================================
  550. [STATE BuildStoragePlace2]
  551.     
  552.     TutorialTextID = 342
  553.     ReturnState = 'WaitForStoragePlace2'
  554.     SetState("Show_tutorial_text")
  555.  
  556. [STATE WaitForStoragePlace2]
  557.     IF IsEnterState
  558.     THEN
  559.         ClearCommandQueue()
  560.     END
  561.  
  562.     // Is there a queued command ? 
  563.     IF GetCommandQueueLength() > 0
  564.     THEN
  565.         IF NextCommand.GetType() == 7
  566.         THEN    
  567.             SetState("VerifyForStoragePlace2Location")
  568.         ELSE
  569.             NextCommand.Cancel()
  570.             ClearCommandQueue()
  571.             SetState("BuildStoragePlace2")
  572.         END
  573.     END
  574.  
  575. [STATE VerifyForStoragePlace2Location]
  576.     IF IsHighlighted(BuildingFactoryID) AND
  577.         IsHighlighted(ShopID)
  578.     THEN
  579.         NextCommand.Run()
  580.         StoragePlace2ID = User.GetLastBuildingBuilt()
  581.         ClearCommandQueue()
  582.         SetState("SetBuildingFactoryProduction")
  583.     ELSE
  584.         TutorialTextID = 403
  585.         ReturnState = 'WaitForStoragePlace2'
  586.         SetState("Show_tutorial_text")
  587.     END
  588.  
  589. // ============================================================================
  590. // CLICK ON FACTORY
  591. // ============================================================================
  592. [STATE ClickOnFactory]
  593.     TutorialTextID = 334
  594.     ReturnState = 'WaitForClickOnFactory'
  595.     SetState("Show_tutorial_text")
  596.  
  597. [STATE WaitForClickOnFactory]
  598.     IF ProductionDialog.IsOpen() == 1
  599.     THEN
  600.         SetState("Shops")
  601.     END
  602.   
  603.  
  604. // ============================================================================
  605. // SHOPS
  606. // ============================================================================
  607. [STATE Shops]
  608.     TutorialTextID = 335
  609.     ReturnState = 'WaitForShopDialog'
  610.     SetState("Show_tutorial_text")
  611.  
  612. [STATE WaitForShopDialog]
  613.     IF ShopDialog.IsOpen() == 1
  614.     THEN
  615.         TutorialTextID = 336
  616.         ReturnState = 'WaitForDemand'
  617.         SetState("Show_tutorial_text")    
  618.     END
  619.  
  620. [STATE WaitForDemand]
  621.     IF ShopDialog.IsOpen() == 0
  622.     THEN
  623.         SetState("Shops")
  624.     END
  625.  
  626.     IF ShopDialog.GetButtonPressed() == 2 AND
  627.         ShopDialog.GetProduct() == 73
  628.     THEN
  629.         SetState("SetBuildingFactoryProduction")
  630.     END
  631.  
  632.  
  633.  
  634. // ============================================================================
  635. // SET PRODUCTION
  636. // ============================================================================
  637. [STATE SetBuildingFactoryProduction]
  638.     
  639.     TutorialTextID = 336
  640.     ReturnState = 'WaitForBuildingFactoryProduction'
  641.     SetState("Show_tutorial_text")
  642.  
  643. [STATE WaitForBuildingFactoryProduction]
  644.     // Is there a queued command ? 
  645.     IF GetCommandQueueLength() > 0
  646.     THEN
  647.         IF NextCommand.GetType() == 14
  648.         THEN    
  649.             SetState("Verify_building_factory_production")
  650.         ELSE
  651.             NextCommand.Cancel()
  652.             ClearCommandQueue()
  653.             SetState("SetBuildingFactoryProduction")
  654.         END
  655.     END
  656.  
  657. [STATE Verify_building_factory_production]
  658.     // Is it correct product & load ?
  659.     IF NextCommand.GetInternType() == 73 
  660.     THEN
  661.         NextCommand.Run()
  662.         ClearCommandQueue()
  663.         SetState("ShowMissionGoal")
  664.     ELSE
  665.         NextCommand.Cancel()
  666.         ClearCommandQueue()
  667.         SetState("SetBuildingFactoryProduction")
  668.     END
  669.  
  670. // ============================================================================
  671. // MISSION GOAL
  672. // ============================================================================
  673. [STATE ShowMissionGoal]    
  674.     FirstTutorialTextID = 340
  675.     LastTutorialTextID  = 341
  676.     ReturnState = 'End'
  677.     SetState("Show_tutorial_text_serie")
  678.  
  679. // ============================================================================
  680. // END
  681. // ============================================================================
  682. [STATE End]
  683.  
  684.     IF IsEnterState
  685.     THEN
  686.         StopCommandFiltering()
  687.     END
  688.  
  689.     // Otherwise do nothing ... 
  690.  
  691.  
  692. // ============================================================================
  693. // HELPER STATES
  694. // 
  695. // Here are some states, which are used to do repetitive tasks.
  696. // ============================================================================
  697. //-----------------------------------------------------------------------------
  698. // Show_tutorial_text
  699. // - Opens tutorial text
  700. // - Waits until it is closed
  701. // - Returns to the return state
  702. // ----------------------------------------------------------------------------
  703. [STATE Show_tutorial_text]
  704.  
  705.     IF IsEnterState
  706.     THEN
  707.         TutorialText.Show(TutorialTextID)
  708.     ELSE
  709.         IF TutorialText.IsOpen() == 0
  710.         THEN 
  711.             SetState(ReturnState)
  712.         END
  713.     END
  714.  
  715. //-----------------------------------------------------------------------------
  716. // Show_tutorial_text_serie
  717. // - Shows a serie of tutorial texts from FirstTutorialTextID to LastTutorialTextID
  718. // ----------------------------------------------------------------------------
  719. [STATE Show_tutorial_text_serie]
  720.  
  721.     IF IsEnterState
  722.     THEN
  723.         Local_i = FirstTutorialTextID
  724.         TutorialText.Show(FirstTutorialTextID)
  725.     ELSE
  726.         IF TutorialText.IsOpen() == 0
  727.         THEN 
  728.             Local_i = Local_i + 1
  729.             
  730.             IF Local_i > LastTutorialTextID
  731.             THEN
  732.                 SetState(ReturnState)
  733.             ELSE
  734.                 TutorialText.Show(Local_i)
  735.             END
  736.         END
  737.     END
  738.